﻿<Window x:Class="MetroJabb.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    
    <Grid>
        <!-- UI before connected -->
        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding IsConnected, Converter={StaticResource InvertedBoolToVisibilityConverter}}">
            <TextBlock Text="You have not connected to chat server..." />
            <Button HorizontalAlignment="Center" Content="_Connect" Command="{Binding ConnectCommand, Mode=OneWay}" />
        </StackPanel>
        
        <!-- UI after connected -->
        <DockPanel Visibility="{Binding IsConnected, Converter={StaticResource BoolToVisibilityConverter}}">
            
            <ListBox x:Name="RoomList" DockPanel.Dock="Left" MinWidth="150" Margin="5,5,0,5">
            </ListBox>
            
            <DockPanel DockPanel.Dock="Bottom" Margin="5">
                <Button Content="_Send" DockPanel.Dock="Right" Padding="10,0" Click="Button_Click"></Button>
                <TextBox x:Name="TypingBox" Margin="0,0,5,0" />
            </DockPanel>

            <ListBox x:Name="Messages" Margin="5">
            </ListBox>
        </DockPanel>
    </Grid>
</Window>